package com.example.demo.design.demo01_simpleFactory;

/**
 * Created by 蔡超 on 2018/10/1.
 */
public class OperationDivide implements OperationI {
    @Override
    public double calculation(double a, double b) {
        if(b != 0){
            return a/b;
        }else{
            throw new RuntimeException("除数不能为0");
        }
    }
}
